.\" Copyright (C) 2008  Alexey Gladkov <legion@altlinux.org>
.\" Copyright (C) 2008-2009  Dmitry V. Levin <ldv@altlinux.org>
.\"
.\" This file is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
.
.TH "GEAR-CHANGELOG-RULES" "5" "December 2009" "gear @VERSION@" "File Formats"
.SH NAME
gear\-changelog\-rules \- rule file for gear\-changelog
.
.
.SH DESCRIPTION
.
The rule file specifies actions of
.BR gear\-changelog (1)
required to filter and format got commit messages.  There are two types of
directives: global and sectional.  Global directives should be defined before
any sections.
.
.
.SH FORMAT
.
A rule file consists of lines of the following format:
.RS 4
.PP
.IB directive\^ :
.IR <value>
.RE
.
.PP
Empty lines and lines beginning with \*(lq#\*(rq are ignored.
Directive arguments are delimited by whitespace characters.
.
.
.SH GLOBAL DIRECTIVES
.
.TP
.BI "width: <number>
Set width of changelog messages.  Default is 70 symbols.
.
.
.
.SH SECTION DIRECTIVES
.
.TP
.BI "group: <TEXT>
This directive begins a new section.  It should contain a description for this group.
This description will be used as a group message in the changelog.
.TP
.BI "regexp: <PATTERN>
Specifies the
.IR <PATTERN>
on which a commit message can be attributed to this group.
You can specify more than one directive of this kind.
.TP
.BI "filter: <SED-COMMAND>
Specify commands for
.BR sed(1)
utility to transform each commit message before it will be written into
changelog.  You can specify more than one directive of this kind.
.
.
.SH FILES
.TP
.BR .gear/changelog
The
.BR gear\-changelog (1)
expect to find rules, unless another name is specified by the
.BI \-\-rules= filename
option.
.
.
.SH EXAMPLES
.nf
[localhost]$ cat .gear/changelog <<EOF
group: gear-changelog utility changes
regexp: ^gear-changelog(-rules.5.in)?: 
filter: s/^gear-changelog: //
filter: s/^gear-changelog-rules.5.in: /Documentation: /

group: gear-merge utility changes
regexp: ^gear-merge:
filter: s/^gear-merge: //
EOF

[localhost]$ gear-changelog
* Wed Jun 18 2008 Alexey Gladkov <legion@altlinux.org> 1.4.0-alt1
- gear-changelog utility changes:
  + Replace /bin/ash with /bin/sh.
  + Documentation: Fix typo.
  + Read first commit too.
  + Fix typo.
- gear-merge utility changes:
  + Fix spacing in help message.
  + Update copyrights.
  + More choices in interactive merge mode (thx Alexey I. Froloff).
  + Document --no-interactive option (thx Alexey I. Froloff).
  + Implement --stop option (thx Alexey I. Froloff).
.fi
.
.
.SH AUTHOR
.PP
This manual page written by Alexey Gladkov  <legion@altlinux.org>.
.PP
Authors and contributors of the programs included in the
.B gear
package are listed in the manual pages for these programs.
.
.
.SH SEE ALSO
.PP
.na
.nh
.tr -\(hy
.BR gear\-changelog (1).
